<!-- 
	스터디에 가입된 현재 멤버
	수정할 사항
		- userDatail 에 대해서도 출력을 하여야 한다.
 -->
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ page import="java.util.*" %>
<%@ page import="model.*" %>
<!DOCTYPE HTML>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0 maximum-scale=1.0, user-scalable=no" />
	<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
	<link rel="stylesheet" href="css/questudy.css" />
	
	<script src="http://code.jquery.com/jquery.js"></script>
	<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
	<script src="js/questudy.js" ></script>
	<script src="js/manageStudy/manageStudy.js"></script>
<title>Welcome to Questudy</title>
</head>
<%
	ArrayList<User> userList = new ArrayList<User>();
	ArrayList<UserDetail> userDetailList = new ArrayList<UserDetail>();
	if(request.getAttribute("userList") != null)
		userList = (ArrayList<User>)request.getAttribute("userList");
	if(request.getAttribute("userDetailList") != null)
		userDetailList = (ArrayList<UserDetail>)request.getAttribute("userDetailList");
	int studyId = ((Integer)request.getAttribute("studyId")).intValue();

%>

<body>
	<jsp:include page="/nav/nav_main.jsp"></jsp:include>
	<jsp:include page="/nav/nav_study.jsp"></jsp:include>
	<div class="conatiner firstDiv">
		<div class="col-md-6 col-lg-6 col-md-offset-3 col-lg-offset-3">
			<ul class="list-group">
				<% for(int i=0; i < userList.size(); i++) { 
					User user = userList.get(i);
					UserDetail userDetail = userDetailList.get(i);
				%>
				<li class="list-group-item" onclick="showBlockInfo('<%=user.getMemid()%>')">
				<%= user.getMemid() + " " + user.getName() %></li>
				<li class="list-group-item mem-info" id='<%= user.getMemid()%>'>
					<ul class="list-group">
						<li class="list-group-item">현재 진행중인 스터디 <%=userDetail.getOngoingStudy() %></li>
						<li class="list-group-item">완료한 스터디        <%=userDetail.getClearStudy() %></li>
						<li class="list-group-item">완료한 퀘스트        <%=userDetail.getClearQuest() %></li>
						<li class="list-group-item">진행했던 모든 퀘스트 <%=userDetail.getTotalQuest() %></li>						
					</ul>
				</li>
				<% } %>
			</ul>
		</div>
	</div>
</body>
</html>